Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iso-websocket

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-websocket

Isomorphic, resilient and extensible Websocket.

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

iso-websocket NPM Version License iso-websocket

iso-websocket implements the Websocket interface and is compatible with the browser, node.js and any other engine that implements basic Web APIs.

Features

  • Standard API and isomorphic
  • Reconnects automatically on close, connection timeout and connectivity events
  • Supports connection timeout
  • Extensible retry strategy with shouldRetry option and node-retry
  • Queue messages while offline, disconnected or reconnecting
  • Supports custom url callback to reconnect to a different url
  • Extensive tests
  • Typed events

Install

pnpm install iso-websocket

Usage

import { WS } from 'iso-websocket'

const ws = new WS('ws://localhost:8080')

ws.addEventListener('message', (e) => {
  console.log(e.data)
})

ws.send('hello')

ws.close()

Docs

Check https://hugomrdias.github.io/iso-repo/modules/iso_websocket.html

License

MIT © Hugo Dias

Keywords

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc